// utils/component/showVideo/showVideo.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    url: {
      type: String,
      value: '',
      observer: function(newValue, oldValue) {
        this.setData({ urlStr: newValue})
      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    show: false,
    urlStr: '',
  },

  ready: function () {
    this.videoContext = wx.createVideoContext("myVideo", this)
  },

  /**
   * 组件的方法列表
   */
  methods: {
    show() {
      // this.videoContext.seek(0);
      // this.videoContext.play();
      this.setData({ show: true })
    },
    dismiss() {
      // this.videoContext.pause()
      this.setData({ show: false })
      this.triggerEvent("dismiss")
    },
    move: function () { }
  }
})
